它类似于+ =.见这里的表格
|= bitwise inclusive OR and assignment operator C |= 2 is same as C = C | 2
所以它相当于将代码编写为:
equal = equal | a.charAt(i) ^ b.charAt(i)
另外正如luk2302正确指出的那样,那里(按位异或)^
优先于(按位包含OR),|
所以你可以把它包含在括号内,如下所示:
equal = equal | (a.charAt(i) ^ b.charAt(i))